//
//  LBViewChangeAnimationDelegate.h
//  LittleBall
//
//  Created by apple on 11-11-20.
//  Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
//#import "LBBall.h"

//#define SCORE_LABEL_MOVE_SPEED     0.8

#define LB_ALPHA_0  0
#define LB_ALPHA_1  99.0

#define ALPHA_CHANGE_SPEED  0.3

typedef enum
{
    LB_VIEW_CHANGE_MAIN_TO_CONFIG = 0, // 从主菜单切换到游戏设置界面
    LB_VIEW_CHANGE_CONFIG_TO_MAIN, // 从游戏设置界面切换到主菜单
    LB_VIEW_CHANGE_CONFIG_TO_INFO, // 从设置界面调出游戏说明界面
    LB_VIEW_CHANGE_INFO_TO_CONFIG, // 从游戏说明界面返回设置界面
    LB_VIEW_CHANGE_TYPE_UNKNOWN // 未知得切换类型
}LB_VIEW_CHANGE_TYPE;

typedef enum
{
    // 从主菜单到设置菜单的变化过程
    LB_VIEW_CHANGE_MAIN_DISAPPEAR_STEP1 = 0,
    LB_VIEW_CHANGE_MAIN_DISAPPEAR_STEP2,
    LB_VIEW_CHANGE_MAIN_DISAPPEAR_STEP3,
    LB_VIEW_CHANGE_MAIN_DISAPPEAR_STEP4,
    LB_VIEW_CHANGE_CONFIG_APPEAR_STEP1,
    LB_VIEW_CHANGE_CONFIG_APPEAR_STEP2,
    LB_VIEW_CHANGE_CONFIG_APPEAR_STEP3,
    LB_VIEW_CHANGE_CONFIG_APPEAR_STEP4,
    
    // 从设置菜单到主菜单的变化过程
    LB_VIEW_CHANGE_CONFIG_DISAPPEAR_STEP1,
    LB_VIEW_CHANGE_CONFIG_DISAPPEAR_STEP2,
    LB_VIEW_CHANGE_CONFIG_DISAPPEAR_STEP3,
    LB_VIEW_CHANGE_CONFIG_DISAPPEAR_STEP4,
    LB_VIEW_CHANGE_MAIN_APPEAR_STEP1,
    LB_VIEW_CHANGE_MAIN_APPEAR_STEP2,
    LB_VIEW_CHANGE_MAIN_APPEAR_STEP3,
    LB_VIEW_CHANGE_MAIN_APPEAR_STEP4,
    
    // 从设置界面调出游戏说明界面变化过程
    LB_VIEW_CHANGE_CONFIG_DISAPPEAR_ALL,
    LB_VIEW_CHANGE_INFO_APPEAR_ALL,
    
    // 从游戏说明界面返回游戏设置界面变化过程
    LB_VIEW_CHANGE_INFO_DISAPPEAR_ALL,
    LB_VIEW_CHANGE_CONFIG_APPEAR_ALL
    
}LB_VIEW_CHANGE_STEP;


@interface LBViewChangeAnimationDelegate : NSObject
{
    //UILabel  *m_currentScoreLabel;
    //int      m_score;    
    //id       m_owner;

    LB_VIEW_CHANGE_TYPE m_type;
    LB_VIEW_CHANGE_STEP m_step;
    
    id      m_from;
    id      m_to;
}

//@property (retain) id m_owner;

@property (retain) id m_from;
@property (retain) id m_to;

-(id)initWithFrom:(id)from To:(id)to ChangeType:(LB_VIEW_CHANGE_TYPE)type;

- (void)animationWillStart:(NSString *)animationID context:(void *)context;
- (void)animationDidStop:(NSString *)animationID finished: (NSNumber *)finished context:(void *)context;

- (void)changeAlpha0To1OfView:(UIView *)view Step:(LB_VIEW_CHANGE_STEP)step;
- (void)changeAlpha1To0OfView:(UIView *)view Step:(LB_VIEW_CHANGE_STEP)step;

- (void)changeAlpha0To1OfViewArrary:(NSArray *)viewArray Step:(LB_VIEW_CHANGE_STEP)step;
- (void)changeAlpha1To0OfViewArrary:(NSArray *)viewArray Step:(LB_VIEW_CHANGE_STEP)step;

// 设置 view 数组的 hidden 属性
- (void)setProptsOfViews:(NSArray *)viewArray Hidden:(BOOL)bHidden;

@end